#!/usr/bin/env python3
def compl( rna ):
   ss = ""
   for i in range(0,len(rna)):
      ss = ss + cmpl[ rna[i] ]
   return ss   

def toProtein(ss, cds):
    prot = ""
    ll = len(ss)
    for i in    range(0,ll,3):
        prot = prot + cds[ss[i:i+3]]
    return prot

def toRNA(ss):
    rna = ""
    ll = len(ss)
    for i  in    range(0,ll):
        if ss[i] == 'T':
           rna = rna + 'U'
        else:
           rna = rna + ss[i]       
        
    return rna



def reverseCompl(rna):
    ss = compl(rna)
    ll = len (ss)
    ss1 = "" 
    for i in range(0,ll):
        ss1 = ss[i] + ss1   
    return ss1    

def getCDS():
    fin = open("codons.dat","r")
    lines = fin.readlines()
    cds = {}
    for lns in lines:
        wds = lns.split(' ')
        cds[wds[0].strip()]=wds[1].strip()
    return cds 



cmpl = {'A':'U', 'C':'G', 'G':'C', 'U': 'A'}
#------------------------------------------------------

#sdna = "TTCGAATCCGTATTGCTTTGGTTGGTTGAGAGAGCGACCTACATTGCTAGTCAGAATAGGTGATTCACACAAAGCTTAGCACCTGGGCAGCACCCCGTGATGTAAACCTATGGGAACTAAGGGAGTCCTGCGGTTTTAGCCAGCAAGCGAGCCGGCAGGAACACTCATACCATCGGACGCGTTTGACGCCTCCCCGGAAAGGAAGTATTTGAGCCTCATTATTACGTATTGCCCGTTAGTCGACAAATCAAGCCCTCGTACGCAGCTTATTCGTACGACGTGGAGGCGTTCCCACGGGCCTAACACGATTGGAACACCACCATAGTAGTGTGGTTCAAATACCTCCTTTGGAGATCTAGAGCTTCACTCTGATTCTAGAGGCAACTTTACAATCGCTCTACGAAATTGTATGGACATCATCAACCGGATATTCTGGGGCGGTAGAATTTCTTTTGTTCGAATCGCTCTAGGCCAGGATCAAATTAATTGAATTGCGGACTCAAGGATCGCGATAGCCGACACATCGGACGCTGTAGAAAGCCAGTCTCTGGATTTAATCCACCCTCTATGTTTGACAAAGCACTAAAACGGGATAGTTTCGGGTGGTATAAGTTTCCCAAGACGATTGCATCGCAATTCATCAACAACCATGAACTTACTGTTTTAGTACTTCCACACACCTTGTTAAATTACGCCTTTACTTCATGTTGCGGTGTGTGTTAGATAGTGTGCAGCTACAAGTCTACCGCCATCGCAGCTCGGGATACCGGCAGATGAGATGGTCCTGAGCTCGTACCGGACTCAAACTTTTTCCTTTACTACCTAGGAATCGCCCATGCGAATTTGTCGGACACACACCATTACATTAACGTCACAACAGCTACTGTTAGAATTTTGCTCTTGCAAATCCTGGAAAGAGTTAAAAAAACTCTTCCGCGCGCCAATAGGGTAAATAATAGATAGCCAGACGGCTGTAAGAGGTGATGACATTTGCAACAATCATGCTGTCGCATCTTCCGCAAGTTCATGTCGCGCCTAGGCAATGGATCTGCGAATGGGGGCCACGGGGTATGAACTACGGAATTCTAAGAAAGTTGCCATCCAGAGTTAAGGGTTTGAGGCTAGTTGCATCGCTGGTAACGAACTACCTCATTACTTGGACGCGCAGTGTGACTTCACTCCTGTATAGCGATGATGCCAAGCAGGAATTAGCAAATCTGAAGAGCGTTTCCAAACTGGCCACTTGGACTGACACCTATCGCGGGGGATTTCAGCGCGTGTCGCTCTCACATGAGAGCTGCCGTCAGGAGCGGTAGAGTTTAGAGAGGAATGCGACAAACTCCCTATTCACCTCTCTGGTGATGTAAGGATATTTACGCTTAGTTCTATGCCAGGCTTAGGGCCTCTCGGAACTTTGGTGAGTCCTTATTAATTGATGCTACCTCTCCCTTACCTTCGCCCCAAGTCACGTAGAAGTACTCAATCCTGCTACATGATAATCAAATATTTCCAACGTTGGGAAATCGGTGACATCACATACTAGTTAAGAAACCACTGTCAGTGAACTTATATCCGGGGGAGAAAATCTACTAACTTACATACGCTGTGCGAGCAGTTTTCATTATAAGAAAATATACTCCCGAGGTACCGCATCAAGCACGACATTCCCGGAGAGCATAACATTTCGGTGCACCTGCTTTTGTGCGCTTGCTTGCGGTTATTTATAAACTACGCACAAGGCGCAAACCGCAGTGCGCATGTTTTCTCCGCCTGGCTAGAACTCGACATTCTCGTCAACGCCAATCTATGTGAGAGGATTTAGACCTCTGTGAAAACGAGTCCCTCTATAGAATAAATACCCAGATGCCAATGGGGGTTCTATCCGATGGCAGTGCATGGAGTGGTGGCTCCAGATTAAGGATGAGGAGAGGTAAAGATAACAGTTCGGTCGCCACGACGCGTTGCCAATCGAAATATCAGTACTAAAAGGCCCACCGCTCCGCTTTAGTCCGACTTTACATCCTGTGGAAATTGTCGAACGGAGGCTACATCGGGCTATATGAGTGTGAAAACCTATACTTCTCGCGTCGTTACTCAGTGCCGGTCTCCTGTTTCCCCCAGTCTTACGTACCCTTATTGATATTTGCTTCACGTTGAAACGTCCTAACGCAGCGTAAAGAGGTGTTTGAACCTCATTACTATAAAATCGCGATCGAAGGTAGACTACATACGCAAACGCCGAAACCCTCAGTTGGCCTTGTTGCAAGTATGGAACGTTGTAAAATTTTTCCTAGACGTTGAGCTATCGGTACAAGGTCGTTAGCGTCCTTACCCTTCACTTATATGCCCGACAAAACGCGGGTCCTAGTGCAGTGGTGGGAGCTTGGAATCCCGCAATACAAGGACAACCTGTATCTCGTTCGGCGTTCCGCGATCACTCGATCCCGAACCACTCCAAGCCTGGTTGATCAGCAAAAGCGGAAGGATGGATAAAGGGCTACTGGTTAATGGATGTAAACTTCCAATGATGAAATCCTGGAAACGAGGGATCGGGTTACGGTGGCGAACGGGGTACGGCAACGTGGCTATCTAGAGCCCGACGTTACGACTCATGTACATGCTGCTACGTGGTTGAAGCTGACGTTCAGATGAAGCAGTACTGAGTCCTAGGGCTTACTACTACTCCAATAGGTCTGGCCGGCCAGATACAAAAGTTCGTGGCGGCTCACCCCCTTTCTGGCGGGTGTAGCTTGCTGACCGGTTTGCTCGATAACACAGGCTAGCGAATAGTAATGAGGTTCGAAAACCTCTTTCCAACGACTGAAAGGGTCTACACGAACTATCTACATTTCCCCGCCCATGTCCTTCCGTCTGGTTGCTTCTGGAGATCCTTTCGCATTATACCGCAGCGTAGTGGCTCTGGCATATATGAAAAAATCCTTCTGTGGGTATTTGTGCCATCACTTATTGTTCGTACCGATATGGGATTACAAGTGCGATGTGATAATAAGCGAAGAAGCCAACATGTTACACTGTTCATGCGCTCCGGGTAATGTGCGGGCACCATGCTCAGTTCCCGCTCGCAGTTGTCACTGTCCCTGTTTCGGCACCATAATCAACATTTCCACGGCCACGCTGGTGAATAACCGAGGATACCGAAGTACAGCAAGAATGAGAGCGGGACTCCTCCATCTGCTTGTAATACGCCTTCAAGATAGTCCATAAAACGGTCGGGGTCTTGTTTCGGACTAGCCGCTTTGAAACGGTGCATAGTTGTGTCAAGTGTGGACATTGGCTTTCTATCCTCGTCAGCGATCCTCGGAAAGACTCGGGCAGTCGCCCCGAATCGTAATTAGGTAGTAGTGCGGCTCAAAAACTTCCTTCGACCTAACCGCTATAATGTTCGTAGATATAAATTTCGTTTCAGTATTAACAGGCGCACCGTATATATACGGAATGGTGTCGCCCCATTAGCTGCTCGCCAATATTTATCTAAGACCGCGCGCGTCTAGCGCCTTTAGTAGTTGCACCCGAGTATAGTAATGGGGTTCGAAGACTTCCTTCGCAAGGCTGCCATACTGTATCACAAGTACTGACGGAGCCCCGGAGGAGTGCAGGATACGGCAAAGGAGACCATTACCGGGGCATGAGTCCAAGTTAGCCCGTTAGGTGAAGGACGCTGATACAATAGTGAATCCGTTACTGAAAGGTTTAGAAGACCGGGGGGCTCGCACTAGGTCCAAATATTATGAACCCTACTCCTGCAACTGAATTGGCCGTCCAGGCGATATTTAAAAGGGGTTACTAGCAGGTTCATCGGAGCCCGTACTCCTTCCGGGCATAGTCGTTCGACGGGTAGAAATTCATCCAGTCGTGCCGGATACCCCGAGAATACCCCTATTTTTTGATCCTTCACCATCATCGTCCGCGGACTCATCTAAGTACCTCAGACCGAAACTGTTATCGTAGCGAAGAGCGAACTCGAATGACATCGCTTGTCCAACAGGGAAAATATGTAAAGTATATGCAGATTATTATAGGAAGATCACAAACTCCATCGCGCCTAGGCCAAAGACTTGCCAGAACAACATCTCTTCCAGAGCAAGGAAGTGTTTGAACCTCACTATTATCGAGAGAAGTCCCATGAATTTATAATAGTGAGGCTCAAAAACTTCCTTCATCGTCGGGCGCTGGGGCGAGCTAGGCTTCCCTAGCCGTCATTACTGTACCCACGCCAAATATTATCGAGTATGACTACGAAGCCTTCACAAGGGGCTGCAGTAACAGACTAACTCACGCACACCGCAACTACTATCCTAAATTGAGTAAGAAAACCCTCGACTATAGCCCTTGAATTAAATTCGCTATTTAAGGAAGACCGCGCTTCCGCTCGCCCGCGTATAGTTTACCAGTCCCAAGAAACATGTGTGGCCAGCCTACCTGAAGAGCTGTGTAAAGATAGATTCTGACATCCTCAAAAAGAAGTTTTCGAGCCGCACTACTACGCACGGAGCTCCGTTATTCAAGGCATGTCGAAGTACAGCGTGGTGGCCTCTCCTGTTCTCCACCCCAGCTAAACCCACCTTGTTCGAATTCGCGCAACTGTATATGACATGAACACTTACAGGGGTTAGAAGTTACTGCAACCAAGATAGAGCTCGTCGAAGTAATAGTGCGGTTCAAAAACTTCCTTCAATTGGTCTCATCACTTAAATTTAAGAGCTATTGTGAGTACAGGTACGGATGCGGCTTCAGTGGATCTTCAGCATTCATTCCTTGTAGTAATGGGGTTCGAAGACTTCCTTGCCAGGGTACCAAACAAGTCTTGCGCATCCTCCTCCCTAAGGAGGTATTTGAACCCCACTATTACCCACGATAGAACATGCAGGGTTTGATAGTGGAACACCTTTTAGAATCTGGGGATAAATTCCCAGGACTAATGTATGGCTGTAGTAATGAGGTTCAAAAACCTCCTTTTCAGGTGGATCGCAGGCCGTGCTGCCTCACAAGCTGGGACGCCGTCCACGGTATAGCCGGCGTCGGCAGTTACTGTGAAATAGCGGAAACTCGATCCCAATATATCATCTTACGTTTGGCGCCCAATAGTCGCCCAGTACCCGTTGACAGTTCTTTAACTCGGCTTAGAACTACTAGACAGGTTCAACCGAACCTTGCCCTAGTTCCCACTCCCGTAATTCATTTGGGTTTGCATCTAGAATACTGGAGGGTGCATAGACGAAACGTGTACGTCGGAGAAAACGTAAGAAAATGACCTAGACTCATAGTAGTGAGGTTCGAAGACTTCCTTTCAGTGAAATCGATCCACCACTCGCCGCGAAGAGATAATAGCATAGAGCACAAGTGCGCGAGTAGAGAAAAAGGCTATCCCAACCGGGCACGTCCTTCGTGTTTGGCGTTTACATACGGCACCCCGTTTCTGCACGTTAACCGTCTAGTATCCAACGGTGGATGGCGGACGCTAGACTATAGATATGAGATATCGAGACCTGGAGCTGGGTGTGGCTGCAGCCCGGGTCATTGCGGGCTGTGAATTCAAGGGCATGTAAACAAGCGTATATCGAACAGTGGATGGGCACCTGCAATACTCACGGTAGAGTTAGCTCACAGGATTCACGTTGAGGACTATGAGTCCCTCTTCGCTAGCAGTCTGGGGGGATATGGAGTTTAATAGCTTGACGTAGTAATGGGGCTCAAACACCTCTTTGTGTGAGCACAGCTACTTGCATTAAGAGATTCTAAACAGCGATCATCTCGGCTATTTCGGGCCAGCCTTTTCGGCAGGATGTTATGTAGCATTTCTGGAAGCTTCCCCCTCGAATCTACTAGTGGTGAGAAGATGCCCCACCGATATTACTCTTTAATCTTGAGAAACCTAAAACCGATCTGACCTCAGACGGGCGGCTCCCACCCGAGGATAAACTCGTCAATAATAATGTGGCTCGAACACTTCTTTTCTCACTAGGCTTTTACGACACGCCACATGTATTTAAGCATCTACCTAACTTGTGTCTGCTGATATACAGCGCATTCTACGCCCAACCTACCAATTACTTCAACGTAGTGCGTGGCTAAAATTCAGGGGAGCTTCATCTCTGTCTTAATTTGAAGGTTCTTCCGGGGCGTTTGGGAATCTTCGTGCCTTTTGCGAGGTTAAGGTATCAAAGAAGTTTTCGAACCACATTATTACCGCCTTAAGCACCGGCGCATCCTGCTCGTGACAACTCTACCCTGCCCTGATAAAGGCACTGAACGTTCCAGAGAGTGCATCATTGACACGCGAGCAGGCCACAGTAGCCACAAGACGTATGGGTGATTATAGAATTGGTGGAGGTGTTGTTAACGATCAGGAGGACATTAGTGGGAGTTAGGAAAGACCCTATGTTCTCTCTATCGCGGACTTGTAACTTGACAAGCAAAAGGGTAAGAGAGCTGCACACCGAAGCAGGCCCTTCCTATACCTGTTTTTCCTACGCGTAGAGAGGAATCCAGAAAGGTGATAATTGGCATTCGATGAAAAAACAGTGTGCCACTGACTTAGTTCTATATGTGAAGAGCCTGTTAGCACGTGACGGCGGCCTTGGTATAGAGCCCTTAATGGTCTCCATCGCGTAGTAATGGGGCTCGAAAACCTCCTTACTTGGGATTGCGTGGCCTCCTTGTGAGTCATACACAAGGCTTAGGGCTATGGGGCGATACACTCCTTTTCGCGGCGCATGGGGCGGTGATGCCTACATAGTAGTAGTGACTGCCTTTCTGGGGGGCTATTTGTGGATGACCAACACCTGACCAGCGATGCAATCGCTAGGGGAGGTACACCTCTCATATGTTACAACAATCACCGAATTGTGTTTCGAATTCGAATCAAGTTTGCGGTGTCGACCAGATCTGGTCTTGCTGCCATACCGGGTTCGCCGCCTCCGGTGGATAGAACTGCATCTTAAGACATCTGGACCCAGCGGTAAGTAGCGGGAAGAGTTTAGAGTCATTCGTACAACTACAGGCTAAGGGCTTACTGGGGAGTTGTTGTAGGGCATAAAGATCGCCCCATGACTTTTCGTACTTTCCCCGATAGTTCACTCGCAGCGAGCTGCGGCTGGGCTTCGCCACACGAGTACGGGCAACATTTATCTCCTCTAATCACTGGGCACCGCGCGAGGAAATAGAAAACCCTAATCAGTGCTCATGGGCGCATCTATTGGTCTCCGCATGCACGATGCCGCGGAGTGCTTAGTTGTCCCTGCATAATCTTCGTAGATGTATAAGAGATTACCTATTTATTCGGTTTCGGTTCTAGACGTACCTTGCCGCATGAGTATAGGCTAATGAACTGAGTTGGCGCCAGAGGGAAAGGCATAATAATGCGGCTCGAATACTTCCTTAAGGAAGTATTCGAACCACATTACTAT" 

sdna ="CCCCATTATGCGTGGAACCGATGGGGCATTTCTACGGCACCACCGAAAAGTTAACATTGTCTAGGCGTACATTACTTGTTCAGCAGTCCCAAGCTGTCTACCTTTCGTGCGTTCCTCGGTCGTATATGAGTAGGTCATACAGGCCGCATATCCACTAAAAAGCGGTCTAGATTCGGGACGTGATGCACACTGTAACAACAAGAGTCAGCGCACGCCCATGACTGCGTGTTATAGCAATCGGTAACGCAGTCCGCTCCTAGAGTCCTATACCTGAACAGGTGGCTACAGAGCGTGCCATGCCTTGTGTTTTACACACCATCCGACGCGACAACCCTAAAATTCAGGATGACTCAGTAATCGTTAGCGTCCAACATAAGCCAAATTCCTCTTGGCTAATCATGTGGGTATGGGCCATGTCTATCGGAGTTGTAGTGCAGCGAGCATGCCATTGTGGCCAGGCGAGGTAATGAATATAGGGACGTAGCATACTGAAGCCCCCCCGGAACCCATTTGCCCTTGCCAACCCAGCTGGATACGTTCCGCTAATGCCCCATCGATTCCATGCATAGTGAATGATCACCCCGAGTGCCGGTCTTAGGACAGTGAATGCAGCGGCAGATGTAATTCCCCATCTATTCCATGCGTAATGCCACTACGCTTGGAACCGTTGGGGCATTATACGACGTGTAAGCTCGTCCTTCGCCGCGGGGTACATGGAGCCTTGTCTAACTAAACATGATTCGCACGTGAACGGCATCTAGGCCTTCCAACAACAAGTCAAAGCAGATATCTCTTACAATAACAACAGGCAGCGTCTCGTGTTGGGCTGCTTTTTCACTATCCTACTGCCTGTGGTGTGACGTTACCGTCAGCTAATGTAACTGGTTGCTCATCCCCGAGAGGTGACACTTTGTGCTTGCTGACGGTTGATGCGTGTTTAGTGGCTTATAAGCTTCGTTCGCCCGTCTATCCAAAAATAATGAGCTACAACGGACAAAAAACTAGCGAGGAAGGACACTGCTTCCGGCGGCCCGGTCGAGCCGATAACACCTGCCTATCTACATTGTGGGATCCTAATGCGCATATCGCATTTTAAGGCGTCTGTGGGGCCTCGTATACAACCGAGCGGAATGTTCTAGGTACGGAGCGGTGCTCTGACGCCAGAATCAGTAAGCGCGCCTATCGCGAATTGTGACATTGACAATTCACTATGGGCGATCCGTACCGTGGATGTCACTGCATGATTTATTAGAGGACGGTATCCCACTGGAAGGGTTCTTGCGCTGGCAGGCATCCAGTCGTCCGACTGACCAGGCCAGGGACGCCAATGTAAACGACCAATCACAAAGGTTCCTCAACGTTTATACTCCGTAACCCTCTAAAGCGCCATCATGTCCAATCTTGTCTACCCCAAGAATGTTCACAGGTCTCGAACCCAATACAAGAAGGTTGAGGGCACTTTCATGGAGAGCCCAAGTCCGCTCACTAGGCTTTCGTTCGGACGGGTCTACTGAGAAGCATAGACGGGGCGTTCATTTCGCATAGAAGGACTTAACAAGGTAGTAGCAAGGTTGTGCTGGCTCTGGCTTCGCCGTGCGTTCTGGCACATGATAAAATGTACATATGACCACGTCATCAGCCCAGCGTTTTTCAGCTATGCCCGAAGAAGGGGTTACATCCCGGGATCGCTAAAGGCCAGTATTCCCCCCTTCAATCCTGCAGGGTACACGGCGGATTGCGTCATGTTTTTCCGCTTGTTAGTCAGCATTACGCGTGGAACAGATGGGGGATAGTTCCAGTATAGGGCCTATAACTCATGGGGTTTTAGCAAGTTACGTGTCTACAAATCTCTTGGTTGCGGAATTATACGAGTAAAACCAGCAAGACAGATTAAAGCCAGCGTGGTAAACCTTTTTTGAGACGATGGGTCTGGTAACTTTTCTTGATCGAATCCCCCAACGATTCCATGCATAGTGGTTCGCCTGAGGTACCCACAAGCTCCGCATTACGCCTGGAATAGATGGGGTATCATGAATGCGGATATTAATGAAAAATGAGTAATATCACCTGGCGCCCCTAATTCAATGCTTTGGAGTGCGAGCCAGGCACTAGGGATAATACCCCGCGTTTATATCTATGCTAGCCTCACATCCATACATGCTGGACTGATCTGCCTCGCATTAATGTCGCGCAAGTATGGTTTCGTTCTGGGCTTGACTACCAGAAGAAAGGAGTCCTCGCTTCCTTAAAACATCTAGTCGCCGCCGGATGCTAAAGAATGCGATATCCCGTGTTAGCCGCGTTCACTGCCCGGACTGTGTTCTGGGGCCAATTCACCCTAGCAGAATGAGGAACCGACTTTCTTTATTTCCTACATTGAGAGGCCTGAACAAAAAATGTTAATCCGTAGTAACAACGACTTCTTGCCATATATCTGTGGAGGGTTCGGGGGTATGGTAGTTAAATAGCGACATGAGCTGACAGGCGTAAGGCCATCCGGGTCTGAGAGTATCAAGAATAGGGGCATATTAGGATGGATGTGGTGGGTCGCGCAATTTTAAGGGAAAGAGAGAACAACGTCACAGCTTGGGATGCGACCGGGCCCTTCAACCGACAGTGGACAATGCAGTCTACAGAATGGTCGATCCCGACTGAACCCATCAACATCAGCCGGGTTCGAACTACCAATATCCAGGTGACTAGCAGTTGCCAATCCCGAGCTAAATGCTAGTATGAACGTGTACCGGATAGTCCCATCCAGATGGACCAGATCGAACACCCTAACGAGCTCGCTCTTTAGCTCGACTGTGGGCTCGGTTGATACGGGTCCCAGAGGAGATGCGAGGGTTGCGCCCCCGCATCCGCCAGAGCTGCATTCATGTGCATTAGAAACTTAACGACGACTTGTTGCGGGCGCCGGCGTACGTGAAATCGGGCCCGCCTACCATGATCGTGAGCCCATTTTGTTGGCATCCTGTATGGGGATAATGAATCCATTGGGTGTCTCGTATATCTTACGCCCACTGATGGAGCCTGGCTTCCCGTCGGCCTTGGGCCGGGCACGCGTGCGAACCTTCTACCGTCTTGGAACTATGGCTTTCATTGTAAATCCAAGGGTGCGGAGTTCTATCGCTATAACTTCTGGGCAGTCTGTCTCGGGTCGTTATGACATTCACTTTCTCATGTAGCGTTCACCAACGACCAAATGTCTCTATCAGTGAGAGTTCCAACGCGGTTATGTACGGGTCTCGTTGGACGCTGTCCACGCGAAATCCCCCATCGGTTCCAAGCATAATGCGACGTCATGGGGACGTCTGCAACGCATCCGACGGAATGATAGGTTTAACGCCGTCATATTGAACTGTGCGTATTCACGATATAAATTTATGTGCGAGGTCGGACAGTAAGCCCAATCCCCTAAAGGACCACCCATACTAGGGGTGCCATGAATTTGTTGGCTGGCTACCACCAAGATGAGGGCATCCCGCAAAAAAGATCTCGTTGTTTTCGATGGTCACAATCTTTCCGGCGATGATTTGGGAGTTCTAGGGTCAATCAATCAAGATGTACGTAACATGATCCACGGTTGTTAATTTACGGCCTATTTCACCATGCGGGCTGCGCTTTCCAGATGACCGCAGGTCTTGCTAACGGATATGTAACCGTAATAGGAAGTCCCGTATGAAACTGAGAGTGATCTGAGGAGCCTGACACGCATAGGTGACAGGCTGCGGTCTAGCCAATATTCTCTACAATCGTTGTTAGTACCTGGGCTACTAGCGGGCTTCACTGGCCTATAGCATTTTTACGAGTCTACATCGATCAGGTGACCCTCACTTTTGACGCTTTACGCGTGTTAGCTAGGGTCTGATATTCCGAGTGTCTGCTCGACCATGACCATGGTACTCCAGTAGAACTGGCAGGCTGGCAGCGGCGCTATATAGGTGCATATGTATAAACGATCATCCATTGAGTCGGTATGAGAAACTCTAACCGCCGCTACCCTGCATCGGGTGTTGTATAGCATGTTACCTCACCTAAACAGCAAGGGTGCGTGCAATTAGCAGTATTTACCAATCACGCGAAGGCGATGCCTTGGTCGGCAACCGTGGCCTGGACTGCAGGTTGTACGGCCTCGGGAATGCCGGAACTGTCCAGCAGCCCTGAAAACACGACAACTGTGCCCATTTAAAATGCCAGGTCAGCCTTGGTCCGCGTAGTGCACTGCGTAAAAAGAGTGGTCTTCCTACACACAGCTTGCGAGGCGGTGCAAGTGGAGATAAGGGTTGTTCGCGTGGAAACAGAAGCACCCGTCGGCGCGGATGACACGGGCCCGAGCAGTTTGAACATCTCCAAAGACCAGGCTTGTCATTCAGTTCAAACGTTCTCGAATCGCACGGACGATTCCGACAATGAATGGGGACAACGCCGACCAGTAGGTTAAAGATGTTGCATGGACACCAAGCGAGGTCGGTTATGATTTTGTACTAGAAGGATAACAGGAATTCGGGCCACTAACTATACTGTGACTACAGCTCCGTTTGAGAGACTACGGTAGCCTTTTGCTTCCGCCTGATGAAAACCACAGACTCGTCGGACCCCACCTTACGCTCAACTAACGCTATGTAATCTTTCTTAAACTGAGACGCCCTGTATAATCCCATCACTTAGTCGGTTGAGCCGCTGCTCCTCGTATACTAAACTAGTTAGAGACAATAGTTTTCTACTGTAGCTGCATGCTGTATCCCGTAGTAACGCGGGCGCCTTACCATACCGAGCTCTGGCGACCAATTCCTAGGTAGTCCGAACCCTACGGAATAAGATCGATTAGTTTTAAGCCATGATAGAGATTGTCAGGGGCATGTAGGATGGGGCTACGCAAGTTTACCCTTCAGCTCGCAACTTTAACGTTATTTGGCACACCTCCACTCGTCCTCCGTTATTGTTAGGTAATGGACAACTCTGTGGATATCACGCGAAGGCGCTTTCCAGAAGAGAGGGGAGGCTAGTATTAGGGGAAACGTTTGTGTTCTTAGAGGTTGGGTTAAACCCCGAAACTCCAGGAATTATAGATTATAGATTCTCTGGACAGCACCCCATCAAATTTCAGAGGATTCCCTCTTGTATCTTCGTTGGGGACCATGCGGAACTGGGCCCACATCACGCACGACTTTTGTTACGCTTCGTTAGCTTTGTTGCCGTCGAATTGTTACTTCCTACTACATCAATGGTAGACGTGCACCACCGGCCTGTGACACGGGCTAACGACTTCTGTTCCAGTTCATTATTTTGGGAGTACCCAACCGTATGAACACACACGGGATATTTTTGGTCCATCTCGCCCTTGCTTTAAAGGGGGAATGTGTCACCATGGCCTTCGTATCCACTTCCAGGTCAAGGCAGATCAATACTGCCCTTCTACGTCGTCGGGCGAGATGCTATGGTAGGTACTCTAAACCCAATTCGGGCCCGAAGGCGGCTTATAACGAAAGCCTGCGTCTCTGCGAACGGACTACATTTAGTGAAAGCGCTCAAAGAGCACGACTGAAGTATAGACAACCCTAACTAGGCTGTACTCGTGACGATACTGCCGCCAATATGCTTGTATACCCCACCTATTCCAAGCGTAATGATAGTGGCTAAAGGACACAGGAAAACACCTCACAACAAAAAGCAAGACTCCACGTGGTTTTTGTGCCGCGCTATGAAATATGGGGGACGATTACACATCTTTTACGCTCGTCGCTTGCACAGTCAGCAACATATATAAGTCACGTCTGCCATGAAGTTCGGGATTAGAAACAGCCTCTCTGCAATTTTGCAGGGGCTAACATACTCTGAACCCTTACTATGCAAGTTGCCGGTTGTGAGTCAGCTTGAAATAAATTTCATCAAGCCTCAGATACCACGACATGGAAATGGACACTGCACAAACTAGTTGCGTGCTGTTTTTGGGAAAGTCTGATTCACATTGCCTGATAACAAGGCTTTAACCGAGAATACACTTTCATACATAAACATTACGCTTGGAACCGCTGGGGGATTAAGCATAAAGCTCAGGTACATGGCGGAAGCAGGAATTCCGTTGTAGCTGGGGCTTTGGTTCCTGCACCCTTTCTTTCATATTCGGTGGTTCTACTATCAATACGGCACCAAGTACGGCGCTCGGTAATATGACGAGCCGCGCACAAGTCTAACGCGTACCCCCAAGTCGTGGGTCTGTGCTGCTCGTGGGCTAAGACAACGGGGGAGAGGCAGGGCCAGCCCCGTTGACCAATTTCGCTGGGTTCTATGTGAGTATACTAAGCAGACGAACAGTGTCTGAAAAGAATCGCCACGCTCTATATATTCAAACCCGAGGGTTACAGGTCGTTGCGATTATTGACACTTTATTTTTAGCTGACCTCGACATCAAGTTAACAGCTTTCGCCACAAGAAGCGTTCTAAGGATAATCCACCCATCTTTCGACCTCCGTATCAATATTGCTAAATTGACTGGACTAAAAATCTCTATAGTTCGATGCCAATCGAATCCGCGGGTAAGCTCCGGGAGTATTCGCTATCGATATCAATTGAGAAGTGTATTACACATGAACTTCTCCTGGCTTCCGCACCAATTATGGCGTGTCCGGCGCGCCCAGCCTGTCCGTGTTGAGGCATGCGGGAAAATCGTGGACACTACATTGTCCGAACCTTGTTATTTAGGGTTTGATCCCCCAGCGGTTCCACGCGTAATGATAACGTTGGACGCTATAAATTCAGCGCGGGGAGGCATGGCTATGGTGGCCCGGGTCTTGTGTGATATGTGAAAAACATAAGGTCGAGCGGTGCCCTCCTCTGCGCCGACTAGGTAATACCCCAGCGATTCCACGCGTAATGGGTCCGGAACCATATGGCGCTCTGTCGACAATAGATTGACGACGAAGACCCGAGAGTGTCGTGAATAGCAGTTGCCGTTTAAACAACCGGGATCATTGTAGAGATCCATGCAGCCTGTGTCGCGTCATGTCTATAGGCAAAGTCCCGTCAAACGCAAGTGAATCACCGGCCACGACATTCATTATGCAGAGACCCTCCTAGAACCCACAGAGAGATCGTTGAGATCGCTGGGATTTGTGTCAGGGCCTCAAAAGTTTATCTGCCTATGGTTCTCTAGACATCGAGACGAAGAAGTAGACCACGAGCGTATCTAGCGCCCCGGGGTTAAAAGTTACGGAGAGCGACCACGTATAGCGCTATCCAGTTAGCACTATGCGTGGAACCGCTGGGGCATCTCGTTCAACGCCGACGTGCAAAAATCGAGCACGTACCTGTAGAGACTACGGCAGTCCTCGTGTGTTCAAAAGAAACTCAATTCCCTAAGGCGACCCAACTAGACGGGGCTAACGTTATGGAGTTTCACGATCTCTGGATCGCGTGTGTGCCCGGACTACGCCGCTCCCGCGATGCTAAGCGACGCGAGTCTAACGAGCGCGGAGAGTTACGATTCGTTACTAGCCTAGTCCCTGGACTGCAGCGCAGTCCGGGCGAACTTCAACTTTTGAGTGGCTGACAATTCCACTACGCTTGGAACAGATGGGGCATTCGGCCGATCAATTGGTCAATATACCTTTGCCCTCATCTTCCGCAGCACCTGGATTGCTTCCAGGGGTAGTCGCGGACCTTACGGTCCCAGAATCTTTTAGTTACCATGCGAGGTCGTTAGCTCTAGCTGTAATCCCTTTCTCGAGGGTCGTCCAGCATTATGCATGGAATAGGTGGGGAATACACTACGCATGGAACCGATGGGGAATCCACTATGCGTGGAATCGCTGGGGGATAAATTCCCCAGCGATTCCATGCATAGTG"
s = toRNA(sdna)


sprot="HYAWNRWGI"
protlen = len(sprot) * 3
ll=len(s)
print (ll)
cds = getCDS()
#print(toProtein(s,cds))
for i in range(0,ll - protlen + 1):
   # print( s[i:i+protlen] )
    sp = toProtein(s[i:i+protlen], cds)
    srev = reverseCompl(s[i:i+protlen])
    spr = toProtein(srev, cds)
    #print(i,sp)
    if sp == sprot:
        print( sdna[i:i+protlen] )
    elif spr == sprot:
        print( sdna[i:i+protlen] )    


    
